When a semiconductor device such as a three-dimensional memory is produced, a metal mask layer is sometimes used to form a hole with a high aspect ratio. In this case, the formation of the metal mask layer is difficult.